<!DOCTYPE html>
<html lang="en">
  <head>
    <title>People Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>
    <a name="//apple_ref/swift/Class/People" class="dashAnchor"></a>
    <a title="People Class Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">Mixpanel 5.0.0 Docs</a> (77% documented)</p>
        <p class="header-right"><a href="https://github.com/mixpanel/mixpanel-swift"><img src="../img/gh.png" alt="GitHub"/>View on GitHub</a></p>
        <div class="header-right">
          <form role="search" action="../search.json">
            <input type="text" placeholder="Search documentation" data-typeahead>
          </form>
        </div>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">Mixpanel Reference</a>
        <img id="carat" src="../img/carat.png" alt=""/>
        People Class Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/Group.html">Group</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/Mixpanel.html">Mixpanel</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/MixpanelInstance.html">MixpanelInstance</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/MixpanelLogger.html">MixpanelLogger</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/People.html">People</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/GzipError.html">GzipError</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/MixpanelLogLevel.html">MixpanelLogLevel</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions/Array.html">Array</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Bool.html">Bool</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Data.html">Data</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Date.html">Date</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Dictionary.html">Dictionary</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Double.html">Double</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Float.html">Float</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Int.html">Int</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSArray.html">NSArray</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSNull.html">NSNull</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSNumber.html">NSNumber</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSString.html">NSString</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Optional.html">Optional</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/String.html">String</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UInt.html">UInt</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/URL.html">URL</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/MixpanelDelegate.html">MixpanelDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/MixpanelLogging.html">MixpanelLogging</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/MixpanelProxyServerDelegate.html">MixpanelProxyServerDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/MixpanelType.html">MixpanelType</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Structs/MixpanelLogMessage.html">MixpanelLogMessage</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ProxyServerConfig.html">ProxyServerConfig</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ServerProxyResource.html">ServerProxyResource</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Typealiases.html">Type Aliases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>People</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">People</span></code></pre>

                </div>
              </div>
            <p>Access to the Mixpanel People API, available as an accessible variable from
the main Mixpanel instance.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel6PeopleC10ignoreTimeSbvp"></a>
                    <a name="//apple_ref/swift/Property/ignoreTime" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel6PeopleC10ignoreTimeSbvp">ignoreTime</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>controls the $ignore_time property in any subsequent MixpanelPeople operation.
If the $ignore_time property is present and true in your request,
Mixpanel will not automatically update the &ldquo;Last Seen&rdquo; property of the profile.
Otherwise, Mixpanel will add a &ldquo;Last Seen&rdquo; property associated with the
current time for all $set, $append, and $add operations</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">ignoreTime</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/People"></a>
                <a name="//apple_ref/swift/Section/People" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/People"></a>
                  <h3 class="section-name"><span>People</span>
</h3>
                </div>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel6PeopleC3set10propertiesySDySSAA0A4Type_pG_tF"></a>
                    <a name="//apple_ref/swift/Method/set(properties:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel6PeopleC3set10propertiesySDySSAA0A4Type_pG_tF">set(properties:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Set properties on the current user in Mixpanel People.</p>

<p>The properties will be set on the current user.
Property keys must be String objects and the supported value types need to conform to MixpanelType.
MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
You can override the current project token and distinct Id by
including the special properties: $token and $distinct_id. If the existing
user record on the server already has a value for a given property, the old
value is overwritten. Other existing properties will not be affected.</p>
<div class="aside aside-precondition">
    <p class="aside-title">Precondition</p>
    <p>You must identify for the set information to be linked to that user</p>

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">set</span><span class="p">(</span><span class="nv">properties</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>properties</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>properties dictionary</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel6PeopleC3set8property2toySS_AA0A4Type_ptF"></a>
                    <a name="//apple_ref/swift/Method/set(property:to:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel6PeopleC3set8property2toySS_AA0A4Type_ptF">set(property:<wbr>to:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Convenience method for setting a single property in Mixpanel People.</p>

<p>Property keys must be String objects and the supported value types need to conform to MixpanelType.
MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">set</span><span class="p">(</span><span class="nv">property</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">to</span><span class="p">:</span> <span class="kt"><a href="../Protocols/MixpanelType.html">MixpanelType</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>property</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>property name</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>to</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>property value</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel6PeopleC7setOnce10propertiesySDySSAA0A4Type_pG_tF"></a>
                    <a name="//apple_ref/swift/Method/setOnce(properties:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel6PeopleC7setOnce10propertiesySDySSAA0A4Type_pG_tF">setOnce(properties:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Set properties on the current user in Mixpanel People, but doesn&rsquo;t overwrite if
there is an existing value.</p>

<p>This method is identical to <code>set:</code> except it will only set
properties that are not already set. It is particularly useful for collecting
data about the user&rsquo;s initial experience and source, as well as dates
representing the first time something happened.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">setOnce</span><span class="p">(</span><span class="nv">properties</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>properties</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>properties dictionary</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel6PeopleC5unset10propertiesySaySSG_tF"></a>
                    <a name="//apple_ref/swift/Method/unset(properties:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel6PeopleC5unset10propertiesySaySSG_tF">unset(properties:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Remove a list of properties and their values from the current user&rsquo;s profile
in Mixpanel People.</p>

<p>The properties array must ony contain String names of properties. For properties
that don&rsquo;t exist there will be no effect.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">unset</span><span class="p">(</span><span class="nv">properties</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">])</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>properties</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>properties array</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel6PeopleC9increment10propertiesySDySSAA0A4Type_pG_tF"></a>
                    <a name="//apple_ref/swift/Method/increment(properties:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel6PeopleC9increment10propertiesySDySSAA0A4Type_pG_tF">increment(properties:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Increment the given numeric properties by the given values.</p>

<p>Property keys must be String names of numeric properties. A property is
numeric if its current value is a number. If a property does not exist, it
will be set to the increment amount. Property values must be number objects.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">increment</span><span class="p">(</span><span class="nv">properties</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>properties</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>properties array</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel6PeopleC9increment8property2byySS_SdtF"></a>
                    <a name="//apple_ref/swift/Method/increment(property:by:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel6PeopleC9increment8property2byySS_SdtF">increment(property:<wbr>by:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Convenience method for incrementing a single numeric property by the specified
amount.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">increment</span><span class="p">(</span><span class="nv">property</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">by</span><span class="p">:</span> <span class="kt">Double</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>property</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>property name</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>by</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>amount to increment by</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel6PeopleC6append10propertiesySDySSAA0A4Type_pG_tF"></a>
                    <a name="//apple_ref/swift/Method/append(properties:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel6PeopleC6append10propertiesySDySSAA0A4Type_pG_tF">append(properties:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Append values to list properties.</p>

<p>Property keys must be String objects and the supported value types need to conform to MixpanelType.
MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">append</span><span class="p">(</span><span class="nv">properties</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>properties</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>mapping of list property names to values to append</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel6PeopleC6remove10propertiesySDySSAA0A4Type_pG_tF"></a>
                    <a name="//apple_ref/swift/Method/remove(properties:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel6PeopleC6remove10propertiesySDySSAA0A4Type_pG_tF">remove(properties:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Removes list properties.</p>

<p>Property keys must be String objects and the supported value types need to conform to MixpanelType.
MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">remove</span><span class="p">(</span><span class="nv">properties</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>properties</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>mapping of list property names to values to remove</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel6PeopleC5union10propertiesySDySSAA0A4Type_pG_tF"></a>
                    <a name="//apple_ref/swift/Method/union(properties:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel6PeopleC5union10propertiesySDySSAA0A4Type_pG_tF">union(properties:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Union list properties.</p>

<p>Property values must be array objects.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">union</span><span class="p">(</span><span class="nv">properties</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>properties</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>mapping of list property names to lists to union</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel6PeopleC11trackCharge6amount10propertiesySd_SDySSAA0A4Type_pGSgtF"></a>
                    <a name="//apple_ref/swift/Method/trackCharge(amount:properties:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel6PeopleC11trackCharge6amount10propertiesySd_SDySSAA0A4Type_pGSgtF">trackCharge(amount:<wbr>properties:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Track money spent by the current user for revenue analytics and associate
properties with the charge. Properties is optional.</p>

<p>Charge properties allow you to segment on types of revenue. For instance, you
could record a product ID with each charge so that you could segement on it in
revenue analytics to see which products are generating the most revenue.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">trackCharge</span><span class="p">(</span><span class="nv">amount</span><span class="p">:</span> <span class="kt">Double</span><span class="p">,</span> <span class="nv">properties</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>amount</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>amount of revenue received</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>properties</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Optional. properties dictionary</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel6PeopleC12clearChargesyyF"></a>
                    <a name="//apple_ref/swift/Method/clearCharges()" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel6PeopleC12clearChargesyyF">clearCharges()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Delete current user&rsquo;s revenue history.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">clearCharges</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8Mixpanel6PeopleC10deleteUseryyF"></a>
                    <a name="//apple_ref/swift/Method/deleteUser()" class="dashAnchor"></a>
                    <a class="token" href="#/s:8Mixpanel6PeopleC10deleteUseryyF">deleteUser()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Delete current user&rsquo;s record from Mixpanel People.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">deleteUser</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2025 <a class="link" href="http://mixpanel.com" target="_blank" rel="external noopener">Mixpanel</a>. All rights reserved. (Last updated: 2025-04-24)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</html>
